//
//  GameState.h
//
//  Header file for a singleton class which stores various states
//  and settings of the app
//

#import <Foundation/Foundation.h>

@interface GameState : NSObject
{
    @private
    // current running score of the player
    int _currentScore;
    
    // number of complete levels so far
    int _completedLevels;
    
    // username of the player
    NSString *_userName;
}

// returns a singleton instance of the GameState object
+(GameState *) sharedGameState;

// set a particular state of the app and have it persist
-(void) setState:(NSString *)state value:(id)stateValue;

// get a state or setting of the app
-(id) getState:(NSString *)state;

// get current score
-(int) getScore;

// increment score by one
-(int) incScore;

// decrement score by one
-(int) decScore;

// reset score to 0
-(void) resetScore;

// erase all high scores
-(void) eraseScores;

// save highest score to app data
-(void) saveHighestScore;

// get number of levels completed
-(int) getCompletion;

// increment number of levels completed
-(int) incCompletion;

// reset number of levels completed
-(void) resetCompletion;

// get username of player
-(NSString *) userName;

// set the username of player
-(void) setUserName:(NSString *)userName;

// sync the settings to have it persist between relaunches
-(void) sync;
@end
